<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>A</title>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
<script>

var urll="http://192.168.60.169:8080/";
function ssq(){
var urlVal=$('#selectId').val();//获取当前select框的值
$.ajax({
 type: 'POST',
 url: urll+'s/'+urlVal,
 success: function(result){
	//$("#myDiv").html(result);
	            var tableInfos = document.getElementById('myDiv');
                 var code = '<TABLE style="margin-left: auto;margin-right: auto;width:500px; text-shadow: 5px 5px 5px #00FF00;" border="1">';
                 for(var i=0;i<result.length;i++){       
                        code += '<TR><TD><font size="6">'+result[i]+'</font></TD></TR>';
                    }
                 tableInfos.innerHTML = code + '</TABLE>';
 },
 error: function(data){
 alert(data);
 }
});

}

function dlt(){
var urlVal=$('#selectId').val();//获取当前select框的值
$.ajax({
 type: 'POST',
 url: urll+'d/'+urlVal,
 success: function(result){
	//$("#myDiv").html(result);
	            var tableInfos = document.getElementById('myDiv');
                var code = '<TABLE style="margin-left: auto;margin-right: auto;width:500px; text-shadow: 5px 5px 5px #00FF88;" border="1">';
<!--                 code += '<TR><TH><font size="5">随机值</font></TH></TR>';-->
                 for(var i=0;i<result.length;i++){       
                        code += '<TR><TD><font size="6">'+result[i]+'</font></TD></TR>';
                    }
                 tableInfos.innerHTML = code + '</TABLE>';
 },
 error: function(data){
 alert(data);
 }
});

}

</script>
</head>
 
<body>
<br>
<br>
<br>
<div style="text-align: center;">
    <form id="dlt">
<!--        <label for="d" style="font-size: 22px;">随机注数:</label>-->
        <input type="button" style="font-size: 30px; border-radius: 10px; border: none; font-weight:bold;" id="d" value="双色球" name="sure" onclick="ssq()">

        <select id="selectId" name="d" style="font-size: 30px;" >
            <option value="2" >2</option>
            <option value="3">3</option>
            <option value="4">4</option>
            <option value="5">5</option>
            <option value="10">10</option>
        </select>
         <input type="button" style="font-size: 30px; border-radius: 10px; border: none; font-weight:bold;" id="d1" value="大乐透" name="sure1" onclick="dlt()">
    </form>
</div>

<br>
<div id="myDiv" style="text-align: center;"><h1>888</h1></div>

</body>
 
</html>


